
<table class="table table-bordered">
    <th>ID</th><th>Nom</th><th>Prenom</th><th>login</th><th>adresse</th><th>cp</th><th>ville</th><th>date d'embauche</th><th>nb langues</th><th>langues</th><th>actions</th>
    <?php foreach ($this->paginator as $unVisiteur): ?>
        <tr>
            <td><?php echo $this->escape($unVisiteur->id); ?></td>
            <td><?php echo $this->escape($unVisiteur->nom); ?></td>
            <td><?php echo $this->escape($unVisiteur->prenom); ?></td>
            <td><?php echo $this->escape($unVisiteur->login); ?></td> 
            <td><?php echo $this->escape($unVisiteur->adresse); ?></td>
            <td><?php echo $this->escape($unVisiteur->cp); ?></td>
            <td><?php echo $this->escape($unVisiteur->ville); ?></td>
            <td><?php echo $this->escape($unVisiteur->dateEmbauche); ?></td>
            <td><?php echo $this->escape($unVisiteur->getNbLangues()); ?></td><td>
                <?php foreach ($unVisiteur->getLangues() as $unelangue): ?>
                    <?php echo $unelangue->libelle; ?>
                <?php endforeach; ?>
            </td>
            <td>
                <a href="<?php
                echo $this->url(array('controller' => 'visiteur', 'action'
                    => 'modifier', 'id' => $unVisiteur['id']));
                ?>">Modifier</a>
                <a href="<?php
                echo $this->url(array('controller' => 'visiteur', 'action'
                    => 'supprimer', 'id' => $unVisiteur['id']));
                ?>">Supprimer</a>
            </td>
        </tr>

    <?php endforeach; ?>
</table>
<ul class="pagination pagination-sm">
<?php
$pages = $this->paginator->getPages();

if (isset($pages->previous)) {
    echo "<li><a href=?page=" . ($pages->first) . "><<</a>&nbsp&nbsp;</li>";
}
if (isset($pages->previous)) {
    echo "<li><a href=?page=" . ($pages->previous) . "><</a>&nbsp&nbsp;</li>";
}
foreach ($pages->pagesInRange as $page) {
    if ($pages->current != $page) {
        echo "<li><a href=?page=$page>$page</a>&nbsp&nbsp;</li>";
    }
}
if (isset($pages->next)) {
    echo "<li><a href=?page=" . ($pages->next) . ">></a>&nbsp&nbsp;</li>";
}
if (isset($pages->next)) {
    echo "<li><a href=?page=" . ($pages->last) . ">>></a>&nbsp&nbsp;</li>";
}
?>
</ul>